package com.fc.design.adapter;

/**
 * <p> Author：lidongxu </p>
 * <p> Title：</p>
 * <p> Description：</p>
 * <p> Create Time：2020-03-31 11:19 </p>
 */
public class AdapterTest {
    public static void main(String[] args) {
        Target target = new ClassAdapter();
        target.request();
    }
}

// 目标接口
interface Target {
    public void request();
}

class Adaptee {
    public void specificRequest() {
        System.out.println("adaptee");
    }
}

class ClassAdapter extends Adaptee implements Target {
    @Override
    public void request() {
        specificRequest();
    }
}